package com.example.Service;

import com.example.Model.City;
import com.example.Reprository.CityDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/5/3.
 */
@Service
public class CityService_Imp implements CityService {
    @Autowired
    CityDao cityDao;
    @Override
    public City findOen(Long id) {
        return cityDao.findById(id);
    }

    @Override
    public List<City> findAll() {
        return (List)cityDao.findAll();
    }
    public City saveCity(City city){
        return  cityDao.save(city);
    }

    @Override
    public List<City> getList() {
        return cityDao.getList();
    }


}
